<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="peoit" tagdir="/WEB-INF/tags" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<peoit:include>
	<div>
		<nav class="breadcrumb">
			<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>
			资讯管理 <span class="c-gray en">&gt;</span> 添加咨询<a
				class="btn btn-success radius r mr-20"
				style="line-height: 1.6em; margin-top: 3px"
				href="<c:url value="/admin/information/list/0"/>" title="返回"><i
				class="Hui-iconfont">&#xe68f;</i></a>
		</nav>
		<div class="pd-20">
			<form action="<c:url value="/admin/information/addInformation"/>" id="form-info-add" method="post" enctype="multipart/form-data" >
				<input type="hidden" name="id" value="${viewData.id}" />
				<div class="mt-20">
					<table
						class="table table-border table-bordered table-bg table-hover table-sort">
						<thead>
							<tr class="text-c">
								<th width="20%">标题</th>
								<th width="60%"><input type="text" name="title" value="${viewData.title }"/></th>
							</tr>
							<tr class="text-c">
								<th width="20%">图片</th>
								<th width="60%">
									<div class="row cl">
										<%--<label class="form-label col-3"><span class="c-red">*</span>项目图片：</label>--%>
										<div class="formControls col-7">
											<div class="fileupload fileupload-new" data-provides="fileupload">
												<div class="fileupload-new thumbnail" style="width: 200px; height: 150px;">
													<c:if test="${empty viewData.picturePath }">
													<img src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&amp;text=no+image" alt="">
													</c:if>
													<c:if test="${!empty viewData.picturePath }">
													<img src="${viewData.picturePath }" alt="">
													</c:if>
												</div>
												<div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 250px; max-height: 150px; line-height: 20px;"></div>
												<div  style="width: 433px">
												  <span class="btn btn-default btn-file">
												  <span class="fileupload-new"><i class="fa fa-paper-clip"></i><p>上传图片</p></span>
												  <span class="fileupload-exists"><i class="fa fa-undo"></i><p>重新上传</p></span>
												  <input type="file" name="infopic" datatype="*"  class="default">
												  </span>
												<a href="#" class="btn btn-danger fileupload-exists" data-dismiss="fileupload"><i class="fa fa-trash"></i><p>移除图片</p></a>
												</div>
											</div>
										</div>
									</div>
								</th>
							</tr>
							<tr class="text-c">
								<th width="20%">资讯简介</th>
								<th width="60%"><textarea rows="20" cols="100" name="informationIntro">${viewData.informationIntro }</textarea></th>
							</tr>
							<tr class="text-c">
								<th width="20%">资讯内容</th>
								<th width="60%"><textarea rows="20" cols="100"
										name="content">${viewData.content }</textarea></th>
							</tr>
							<tr class="text-c">
								<th width="20%" colspan="2"><input type="submit" value="保存"
									class="btn btn-success radius r mr-60"></th>
							</tr>
						</thead>
					</table>
				</div>
			</form>
		</div>
	</div>
</peoit:include>
<script type="text/javascript">
	/*function refreshAndColse(){
		window.parent.location.href = window.parent.location;
	}*/
	$(function(){
		//表单验证ajax提交
		/*$("#form-info-add").Validform({
			tiptype:3,
			callback:function(form){
				$("#form-info-add").ajaxSubFromDialog(this);
//				setTimeout(refreshAndColse,1500);
				return false;
			}
		});*/
	});
</script>